package com.qf.recharge.consumer;

import com.qf.recharge.service.RechargeService;
import com.qf.recharge.service.impl.RechargeServiceImpl;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class OrderCloseListener {

    @Resource
    private  RechargeServiceImpl rechargeService;


    @EventListener(ContextRefreshedEvent.class)
    public void onApplicationStart() {
        rechargeService.startCloseOrderThread();
    }
}
